<template>
    <div>
        <van-swipe :autoplay="3000" :width="375" :height="175">
            <van-swipe-item v-for="(item, index) in images" :key="index">
                <img v-lazy="`https://www.160dyf.com/${item.imagePath}`" />
            </van-swipe-item>
        </van-swipe>
        <div class="box">
        </div>
    </div>
</template>

<script>
    import {homelist} from '../api/home'
    import Vue from 'vue';
    import { Lazyload } from 'vant';
    Vue.use(Lazyload);

    export default {
        data() {
            return {
                images: [],
            };
        },
        created () {
            homelist().then(res=>{
                // console.log(res.data.data.moduleMap[0].item_data);
                this.images = res.data.data.moduleMap[0].item_data
            })
        },
    };
</script>

<style lang="less" scoped>
img{
    width: 100%;
    height: 100%;
}
</style>